package com.zhj.interview;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhj
 * @create 2023-10-23-14:47
 */
public class Test22 {

    /**
     * JVM 参数设置
     * -Xms200m
     * -Xmx200m
     * -XX:+PrintGC
     * -XX:+HeapDumpOnOutOfMemoryError
     * -XX:HeapDumpPath=dump
     *
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
        List<String> list = new ArrayList<>(10) ;
        while (true) {
            Thread.sleep(5);
            for (int i = 0; i < 1000; i++) {
                list.add("1");
            }
        }
    }
}
